package com.example.volunteer.mapper;


import com.example.volunteer.model.Skill;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;


import java.util.List;
@Mapper
public interface SkillMapper {
    void insert(Skill skill);
    void addVolunteerSkill(Integer skillId, String volunteerId);
    void removeAllVolunteerSkills(String volunteerId);

    List<Skill> findByVolunteerIdWithPage(@Param("volunteerId") String volunteerId, @Param("offset") int offset, @Param("pageSize") int pageSize);
    int countByVolunteerId(@Param("volunteerId") String volunteerId);

    List<Skill> findAllWithPage(@Param("offset") int offset, @Param("pageSize") int pageSize);
    int countAll();

    Skill findByContent(String content);
    Integer countVolunteerSkill(@Param("skillId") Integer skillId, @Param("volunteerId") String volunteerId);
}
